import request from '@/utils/request'

export function getMediaList(params) {
  return request({
    url: '/media/list',
    method: 'get',
    params
  })
}

export function postMedia(data) {
  return request({
    url: '/media',
    method: 'post',
    data
  })
}

export function putMedia(data) {
  return request({
    url: '/media',
    method: 'put',
    data
  })
}

export function deleteMedia(data) {
  return request({
    url: '/media',
    method: 'delete',
    data
  })
}

export function getMediaGroupList(params) {
  return request({
    url: '/media/group/list',
    method: 'get',
    params
  })
}

export function postMediaGroup(data) {
  return request({
    url: '/media/group',
    method: 'post',
    data
  })
}

export function putMediaGroup(data) {
  return request({
    url: '/media/group',
    method: 'put',
    data
  })
}

export function deleteMediaGroup(data) {
  return request({
    url: '/media/group',
    method: 'delete',
    data
  })
}
